package c.e.a.c.r;

import android.content.res.ColorStateList;
import android.graphics.Color;
import android.os.Build.VERSION;
import android.util.Log;
import com.pgl.sys.ces.out.ISdkLite;

/* compiled from: RippleUtils */
public class a {
    public static final int[] a = new int[]{16842919};
    public static final int[] b = new int[]{16843623, 16842908};
    public static final int[] c = new int[]{16842908};
    public static final int[] d = new int[]{16843623};
    public static final int[] e = new int[]{16842913, 16842919};
    public static final int[] f = new int[]{16842913, 16843623, 16842908};
    public static final int[] g = new int[]{16842913, 16842908};
    public static final int[] h = new int[]{16842913, 16843623};
    public static final int[] i = new int[]{16842913};
    public static final int[] j = new int[]{16842910, 16842919};
    public static final String k = a.class.getSimpleName();

    public static int a(ColorStateList colorStateList, int[] iArr) {
        int colorForState = colorStateList != null ? colorStateList.getColorForState(iArr, colorStateList.getDefaultColor()) : 0;
        return b.i.d.a.c(colorForState, Math.min(Color.alpha(colorForState) * 2, ISdkLite.REGION_UNSET));
    }

    public static ColorStateList b(ColorStateList colorStateList) {
        if (colorStateList == null) {
            return ColorStateList.valueOf(0);
        }
        int i = VERSION.SDK_INT;
        if (i >= 22 && i <= 27 && Color.alpha(colorStateList.getDefaultColor()) == 0 && Color.alpha(colorStateList.getColorForState(j, 0)) != 0) {
            Log.w(k, "Use a non-transparent color for the default color as it will be used to finish ripple animations.");
        }
        return colorStateList;
    }

    public static boolean c(int[] iArr) {
        Object obj = null;
        Object obj2 = null;
        for (int i : iArr) {
            if (i == 16842910) {
                obj = 1;
            } else if (i == 16842908 || i == 16842919 || i == 16843623) {
                obj2 = 1;
            }
        }
        return (obj == null || obj2 == null) ? false : true;
    }
}
